import { mapState } from "vuex";
export default {
  computed: {
    ...mapState({
      dict: (state) => state.dict.dict,
    }),
  },
  beforeCreate() {
    const dictsArr = this.$options.dicts || [];
    if (dictsArr?.length) {
      this.$store.dispatch("dict/getDict", dictsArr.join(","));
    }
  },
};
